# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=jack_mixer
pkgver=18
pkgrel=1
pkgdesc="Jack desktop mixer application"
arch=(loong64 x86_64)
url="https://github.com/jack-mixer/jack_mixer"
license=(GPL-2.0-only)
groups=(pro-audio)
depends=(
  gcc-libs
  glibc
  gobject-introspection-runtime
  hicolor-icon-theme
  python
  python-appdirs
  python-cairo
  python-gobject
  python-xdg
)
makedepends=(
  cython
  glib2
  jack2
  meson
  python-docutils
)
optdepends=('new-session-manager: for session management')
source=($pkgname-$pkgver.tar.gz::$url/archive/release-${pkgver//./-}.tar.gz)
sha512sums=('4f168d8425dc5fa2d79c2e38fcb178f55745151fd0cb19d122d52329ada915e7f1aa4fba654f79a4e357253a5669a3e28443bd1dff67989952fcc5cad0bdc5cc')
b2sums=('0853dcbab490097ff492a28f2768d1f00a437fbfad19b39f62698c31882620143e989ac0e1a3fe707fa37f0c77c96afb3db48c085acdb43aefea3109ee452baa')

build() {
  arch-meson $pkgname-release-$pkgver build
  meson compile -C build
}

check() {
  meson test -C build
}

package() {
  depends+=(
    glib2 libglib-2.0.so
    jack libjack.so
  )

  meson install -C build --destdir="$pkgdir"
  install -vDm 644 $pkgname-release-$pkgver/*.md -t "$pkgdir/usr/share/doc/$pkgname/"
}
